package Semester_3.JDBCLogin;

import java.sql.Connection;
import java.sql.DriverManager;

public class JDBC {
    public static Connection conn() throws Exception{
        Class.forName("com.mysql.cj.jdbc.Driver");
        String url = "jdbc:mysql:///jdbc_demo?serverTimezone=Asia/Shanghai";
        String username = "root";
        String passwd = "@gaoyang1";
        return DriverManager.getConnection(url, username, passwd);
    }
}
